home *** CD-ROM | disk | FTP | other *** search
/ Click Press Kit / Click Press Kit.iso / pc / main.dxr / Internal_55_savedPhotoCode.ls < prev    next >
Encoding:
Text File  |  2006-05-31  |  5.1 KB  |  140 lines

  1. property spriteNum
  2. global gMaster, gSound, gNotes
  3.  
  4. on mouseUp me
  5.   gSound.mPlayButtonClick()
  6.   vName = sprite(spriteNum).member.name
  7.   if gMaster.pSavedSummaryList.count = 0 then
  8.     alert("you have a problem with gMaster.pSavedSummaryList.count")
  9.     exit
  10.   end if
  11.   repeat with x = 1 to gMaster.pSavedSummaryList.count
  12.     if gMaster.pSavedSummaryList[x].pSmallName = vName then
  13.       gMaster.pCount = gMaster.pSavedSummaryList[x].pNumber
  14.       if gMaster.pSavedSummaryList[x].pSelected = "no" then
  15.         mSetOn(me, x, gMaster.pSavedSummaryList[x].pNumber)
  16.       else
  17.         mSetOff(me, x, gMaster.pSavedSummaryList[x].pNumber)
  18.       end if
  19.       exit repeat
  20.     end if
  21.   end repeat
  22. end
  23.  
  24. on mouseEnter me
  25.   cursor(280)
  26. end
  27.  
  28. on mouseLeave me
  29.   cursor(-1)
  30. end
  31.  
  32. on mSetOn me, vSavedNum, vSummaryNumber
  33.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "photo" then
  34.     vNum = gMaster.pSavedSummaryList[vSavedNum].pKeyNum
  35.     gMaster.pPhotoList[vNum].pSelected = "yes"
  36.   end if
  37.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "logo" then
  38.     vNum = gMaster.pSavedSummaryList[vSavedNum].pKeyNum
  39.     gMaster.pLogoList[vNum].pSelected = "yes"
  40.   end if
  41.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "poster" then
  42.     vNum = gMaster.pSavedSummaryList[vSavedNum].pKeyNum
  43.     gMaster.pPosterList[vNum].pSelected = "yes"
  44.   end if
  45.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "note" then
  46.     case gMaster.pSavedSummaryList[vSavedNum].pType of
  47.       "ProductionNotes":
  48.         gNotes.pProductionSelected = "yes"
  49.       "ProductionNotesSpanish":
  50.         gNotes.pProductionSelectedSpanish = "yes"
  51.     end case
  52.   end if
  53.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "credit" then
  54.     case gMaster.pSavedSummaryList[vSavedNum].pType of
  55.       "ProductionCredits":
  56.         gNotes.pCreditsSelected = "yes"
  57.       "ProductionCreditsSpanish":
  58.         gNotes.pCreditsSelectedSpanish = "yes"
  59.     end case
  60.   end if
  61.   gMaster.pSavedSummaryList[vSavedNum].pSelected = "yes"
  62.   mMainCode(me, vSavedNum)
  63. end
  64.  
  65. on mSetOff me, vSavedNum, vSummaryNumber
  66.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "photo" then
  67.     vNum = gMaster.pSavedSummaryList[vSavedNum].pKeyNum
  68.     gMaster.pPhotoList[vNum].pSelected = "no"
  69.   end if
  70.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "logo" then
  71.     vNum = gMaster.pSavedSummaryList[vSavedNum].pKeyNum
  72.     gMaster.pLogoList[vNum].pSelected = "no"
  73.   end if
  74.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "poster" then
  75.     vNum = gMaster.pSavedSummaryList[vSavedNum].pKeyNum
  76.     gMaster.pPosterList[vNum].pSelected = "no"
  77.   end if
  78.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "note" then
  79.     case gMaster.pSavedSummaryList[vSavedNum].pType of
  80.       "ProductionNotes":
  81.         gNotes.pProductionSelected = "no"
  82.       "ProductionNotesSpanish":
  83.         gNotes.pProductionSelectedSpanish = "no"
  84.     end case
  85.   end if
  86.   if gMaster.pSavedSummaryList[vSavedNum].pType contains "credit" then
  87.     case gMaster.pSavedSummaryList[vSavedNum].pType of
  88.       "ProductionCredits":
  89.         gNotes.pCreditsSelected = "no"
  90.       "ProductionCreditsSpanish":
  91.         gNotes.pCreditsSelectedSpanish = "no"
  92.     end case
  93.   end if
  94.   gMaster.pSavedSummaryList[vSavedNum].pSelected = "no"
  95.   gMaster.pSummaryList[vSummaryNumber].pSelected = "no"
  96.   mMainCode(me, vSavedNum)
  97. end
  98.  
  99. on mMainCode me, vSavedNum
  100.   if gMaster.pSavedSettings.blendeffect = "TRUE" then
  101.     if gMaster.pSavedSummaryList[vSavedNum].pSelected = "no" then
  102.       sprite(spriteNum).blend = 100
  103.     else
  104.       sprite(spriteNum).blend = gMaster.pSavedSettings.blendpercent
  105.     end if
  106.   end if
  107.   if gMaster.pSavedSettings.rectangles = "TRUE" then
  108.     if gMaster.pSavedSummaryList[vSavedNum].pSelected = "no" then
  109.       sprite(gMaster.pSavedSummaryList[vSavedNum].pRectSpriteSaved).rect = rect(-2000, -2000, -1999, 1999)
  110.     else
  111.       vLeft = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).left - 2
  112.       vTop = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).top - 2
  113.       vRight = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).right + 2
  114.       vBottom = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).bottom + 2
  115.       sprite(gMaster.pSavedSummaryList[vSavedNum].pRectSpriteSaved).rect = rect(vLeft, vTop, vRight, vBottom)
  116.     end if
  117.   end if
  118.   if gMaster.pSavedSettings.pushpin = "TRUE" then
  119.     if gMaster.pSavedSummaryList[vSavedNum].pSelected = "no" then
  120.       sprite(gMaster.pSavedSummaryList[vSavedNum].pPushPinSpriteSaved).loc = point(-2000, -2000)
  121.     else
  122.       vLeft = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).left + gMaster.pSavedSettings.pinoffset[1]
  123.       vTop = sprite(gMaster.pSavedSummaryList[vSavedNum].pPhotoSpriteSaved).top + gMaster.pSavedSettings.pinoffset[2]
  124.       sprite(gMaster.pSavedSummaryList[vSavedNum].pPushPinSpriteSaved).loc = point(vLeft, vTop)
  125.     end if
  126.   end if
  127.   vOK = "no"
  128.   repeat with y = 1 to gMaster.pSummaryList.count
  129.     if gMaster.pSummaryList[y].pSelected = "yes" then
  130.       vOK = "yes"
  131.       exit repeat
  132.     end if
  133.   end repeat
  134.   if vOK = "yes" then
  135.     sendSprite(9, #mSetOnStage)
  136.   else
  137.     sendSprite(9, #mSetOffStage)
  138.   end if
  139. end
  140.